package com.lg.algorithm.leetcode;

/**
 * 判断一个 9x9 的数独是否有效。只需要根据以下规则，验证已经填入的数字是否有效即可。
 *
 * 数字 1-9 在每一行只能出现一次。
 * 数字 1-9 在每一列只能出现一次。
 * 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。
 *
 * 作者：力扣 (LeetCode)
 * 链接：https://leetcode-cn.com/leetbook/read/top-interview-questions-easy/x2f9gg/
 * 来源：力扣（LeetCode）
 * 著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。
 *
 */
public class IsValidSudoku {
    public static boolean isValidSudoku(char[][] board) {
        return false;
    }

    public static void main(String[] args) {
        String [][] arr =  {
          {"5","3",".",".","7",".",".",".","."},
          {"6",".",".","1","9","5",".",".","."},
          {".","9","8",".",".",".",".","6","."},
          {"8",".",".",".","6",".",".",".","3"},
          {"4",".",".","8",".","3",".",".","1"},
          {"7",".",".",".","2",".",".",".","6"},
          {".","6",".",".",".",".","2","8","."},
          {".",".",".","4","1","9",".",".","5"},
          {".",".",".",".","8",".",".","7","9"}
        };

        char[][] input = new char[9][9];


        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr.length; j++) {
                input[i][j] = arr[i][j].toCharArray()[0];
            }
        }

        System.out.println(isValidSudoku(input));;


    }
}
